<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="/includes.jsp"%>

<script type="text/javascript">

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i < sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

</script>

<logic:present name="menuDTO">
    <ul id="nav">
        <logic:iterate name="menuDTO" property="menus" id="menu">
            <li><span class="enabled"><beans:write name="menu" property="menuName"/></span>
                <ul>
                    <logic:iterate name="menu" property="itemList" id="item">
                        <li>
                            <logic:equal name="item" property="isEnabled" value="true">
                                <html:link action="processMenuButton.do" paramId="button" paramName="item" paramProperty="name">
                                    <beans:write name="item" property="label"/>
                                </html:link>
                            </logic:equal>
                            <logic:equal name="item" property="isEnabled" value="false">
                                <span class="disabled"><beans:write name="item" property="label"/></span>
                            </logic:equal>
                        </li>
                    </logic:iterate>
                </ul>
            </li>
        </logic:iterate>
    </ul>
</logic:present>
